#!/bin/bash
source /etc/profile

log_dir=/data/log/datacomputing

if [[ ! -d $log_dir ]];
then
	mkdir -p $log_dir
fi

#check memory
now_time=$(date "+%Y-%m-%d %H:%M:%S")

jps -ml | grep  thrift | awk '{print $1}' | while read pid
do
	loginfo=$(ps aux | grep ${pid})
	
	echo ${now_time} ${loginfo} >> $log_dir/memory_status.log
done;